package com.admin.common.enums;

public enum ProvinceModuleScoreEnum {

    provinceScore_M10000 ("区/县气象局评分", "weather_bureau_score"),
    provinceScore_M20000 ("制度机制", "institution_score"),
    provinceScore_M30000 ("防灾准备", "disaster_prepare_score"),
    provinceScore_M40000 ("防灾设施", "disaster_facilities_score"),
    provinceScore_M50000 ("科普培训", "science_score"),
    provinceScore_M60000 ("典型案例", "classic_case_score"),
    provinceScore_M70000("提标升级", "upgrade_score");

    private String key;
    private String name;

    ProvinceModuleScoreEnum(String key, String name) {
        this.key = key;
        this.name = name;
    }

    public String getKey() {
        return key;
    }


    public String getName() {
        return name;
    }

    public static String getText(String key) {
        if (key == null) {
            return null;
        }
        for (ProvinceModuleScoreEnum e : ProvinceModuleScoreEnum.values()) {
            if (e.getKey().equals(key)) {
                return e.getName();
            }
        }
        return null;
    }

}
